home *** CD-ROM | disk | FTP | other *** search
- global gloch, glocv, x1, x2, y1, y2, high, haba
-
- on testr
- if (gloch <= x1) and (gloch >= x2) then
- set gloch to gloch + 5
- if gloch > x1 then
- set gloch to x1
- end if
- set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
- else
- end if
- end
-
- on testl
- if (gloch >= x2) and (gloch <= x1) then
- set gloch to gloch - 5
- if gloch < x2 then
- set gloch to x2
- end if
- set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
- else
- end if
- end
-
- on testd
- if (glocv >= y2) and (glocv <= y1) then
- set glocv to glocv + 5
- if glocv > y1 then
- set glocv to y1
- end if
- set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
- else
- end if
- end
-
- on testu
- if (glocv >= y2) and (glocv <= y1) then
- set glocv to glocv - 5
- if glocv < y2 then
- set glocv to y2
- end if
- set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
- else
- end if
- end
-